package com.service.dataimpl;

import com.dao.DataMapper;
import com.model.Data;
import com.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 编写者：粱嘉宝
 * 编写时间：2019-5-29
 * 类模块描述：查询及相关增删改
 */
@Service
public class DataServiceImpl implements DataService {
    @Autowired
    private DataMapper dataMapper;
    @Override
    public Data selectByPrimaryKey(int did){
        System.out.println("输入的参数为："+did);
        return dataMapper.selectByPrimaryKey(did);
    }

    @Override
    public List<Data> getAllD() {
        return dataMapper.getAllD();
    }

    @Override
    public int delD(Integer did) {
        return dataMapper.delD(did);
    }

    @Override
    public int insertD(Data datamodel) {
        return dataMapper.insertD(datamodel);
    }
}
